<template>
	<!-- 1为活动 2为文案  type 1方案 2 活动案例-->
	<view class="home">
		<navigator  open-type="navigateBack" class="goback">
			<u-icon name="arrow-left" color="#444" size="28" style="margin-right: 10rpx;"></u-icon>
			{{titleName1}}
		</navigator>
		<view class="title">{{detailObj.title}}</view>
		<view class="time">{{detailObj.ctime}}</view>
		<view class="cover">
			<image :src="detailObj.cover_img" mode="" />
		</view>
		<view class="content">
		<!-- 	<view class="contentName">
				活动方案
			</view> -->
			<view class="contentText" v-html="detailObj.detail">
				
				
			</view>
		</view>

	</view>
</template>


<script>
	import titleRow from '@/component/titleRow/titleRow.vue'

	export default {
		data() {
			return {
				title : '',
				index : '',
				searchKeyWord:'',
				goSearch:false,
				detailObj:{},
			};
		},
		computed:{
			
			titleName1(){
				return `${this.title}${this.type}详情`
			},
			
		},
		methods:{
			goMore(_type){
				console.log(_type);
				uni.navigateTo({
					url:`../allActiveAndDocument/allActiveAndDocument?index=${this.index}&type=${_type}`
				})
			},
			async getDetail(_id){
				let res = await this.myhttp({
					url:'api/xlaction/action_row',
					data:{
						act_id:_id
					}
				})
				// if(res.code==1){
					this.detailObj	= res.data.data
					console.log(this.detailObj);
				// }
				// console.log(res)
			}
		},
		onLoad(option) {
			this.index = option.index
			option.index==1 ? this.title = '活动' : this.title = '文案'
			option.type==1 ? this.type = '方案' : this.type = '案例分享'
			this.getDetail(option.id)
		},
		components:{
			titleRow,
		}
	}
</script>

<style lang="scss" scoped>
.home {
	padding: 10rpx 20rpx;
  	.goback {
		height: 70rpx;
		display: flex;
		align-items: center;

		color: #444444;
  	}

	.title {
		font-size: 36rpx;
		color: #111111;
		font-weight: 600;
		padding: 20rpx 0;
	}

	.time {
		color: #888888;
		font-size: 26rpx;
	}

	.cover {
		padding: 20rpx 0;
  		image {
		  	width: 100%;
  		}
	}

	.content {
  		.contentName {
			color: #111111;
			font-weight: 600;
			font-size: 30rpx;
			padding: 20rpx 0;
  		}

  		.contentText {

  		}
	}


	

  
}
</style>
